\section{bayer-lcv.c-Dateireferenz}
\label{bayer-lcv_8c}\index{bayer-lcv.c@{bayer-lcv.c}}
{\tt \#include $<$sys/ioctl.h$>$}\par
{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include $<$fcntl.h$>$}\par
{\tt \#include $<$linux/ioctl.h$>$}\par
{\tt \#include $<$errno.h$>$}\par
{\tt \#include $<$unistd.h$>$}\par
{\tt \#include $<$getopt.h$>$}\par
{\tt \#include $<$string.h$>$}\par
{\tt \#include $<$strings.h$>$}\par
{\tt \#include $<$assert.h$>$}\par
{\tt \#include \char`\"{}bayer-lcv.h\char`\"{}}\par
\subsection*{Makrodefinitionen}
\begin{CompactItemize}
\item 
\#define {\bf INTDIVIDEBY2ROUND}(x)~((x + 1) / 2)
\item 
\#define {\bf INTDIVIDEBY3ROUND}(x)~((x + 1) / 3)
\item 
\#define {\bf INTDIVIDEBY4ROUND}(x)~((x + 2) / 4)
\item 
\#define {\bf INTDIVIDEBY8ROUND}(x)~((x + 4) / 8)
\item 
\#define {\bf SATURATE2CHAR}(x)~(x $<$ 0 ? 0 : (x $>$ 255 ? 255 : x))
\item 
\#define {\bf ISODD}(x)~(x \& 0x1)
\end{CompactItemize}
\subsection*{Funktionen}
\begin{CompactItemize}
\item 
unsigned char $\ast$ {\bf cfa2bgr\_\-AllocMem} (int size)
\item 
unsigned char $\ast$ {\bf cfa2bgr\_\-DoBayerFiltering} (unsigned char $\ast$raw\_\-buf, int header\_\-size, int width, int height)
\item 
void {\bf cfa2bgr\_\-DetFirstPos} (int $\ast$nRx, int $\ast$nRy, int $\ast$nGx, int $\ast$nGy, int $\ast$nBx, int $\ast$nBy)
\item 
void {\bf cfa2bgr\_\-CopyConstPix2Out} (unsigned char $\ast$pInpData, unsigned char $\ast$pOutData, int nXSize, int nYSize, int nStartPixX, int nStartPixY, {\bf Color} Col)
\item 
unsigned char {\bf cfa2bgr\_\-InterpCurGreen} (unsigned char $\ast$pInpData, int nCurIndx, int nXSize)
\item 
void {\bf cfa2bgr\_\-InterpGreen} (unsigned char $\ast$pInpData, unsigned char $\ast$pOutData, int nXSize, int nYSize, int nStartPixX, int nStartPixY)
\item 
void {\bf cfa2bgr\_\-InterpGreenBorder} (unsigned char $\ast$pInpData, unsigned char $\ast$pOutData, int nXSize, int nYSize, int nStartPixX, int nStartPixY)
\item 
unsigned char {\bf cfa2bgr\_\-InterpCurRedOrBlueDiag} (unsigned char $\ast$pInpData, unsigned char $\ast$pOutData, int nCurIndx, int nXSize)
\item 
void {\bf cfa2bgr\_\-InterpRedOrBlue} (unsigned char $\ast$pInpData, unsigned char $\ast$pOutData, int nXSize, int nYSize, int nStartPixX, int nStartPixY, int isRed)
\item 
void {\bf cfa2bgr\_\-InterpRedOrBlueBorder} (unsigned char $\ast$pInpData, unsigned char $\ast$pOutData, int nXSize, int nYSize, int nStartPixX, int nStartPixY, int isRed)
\end{CompactItemize}
\subsection*{Variablen}
\begin{CompactItemize}
\item 
{\bf Color} {\bf m\_\-FirstPixColor} = B
\item 
{\bf Color} {\bf m\_\-SecondPixColor} = G
\end{CompactItemize}


\subsection{Makro-Dokumentation}
\index{bayer-lcv.c@{bayer-lcv.c}!INTDIVIDEBY2ROUND@{INTDIVIDEBY2ROUND}}
\index{INTDIVIDEBY2ROUND@{INTDIVIDEBY2ROUND}!bayer-lcv.c@{bayer-lcv.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define INTDIVIDEBY2ROUND(x)~((x + 1) / 2)}\label{bayer-lcv_8c_ac42e714a968472db53b9b29bfe9e6ba}




Definiert in Zeile 30 der Datei bayer-lcv.c.

Wird benutzt von cfa2bgr\_\-InterpCurRedOrBlueDiag() und cfa2bgr\_\-InterpGreenBorder().\index{bayer-lcv.c@{bayer-lcv.c}!INTDIVIDEBY3ROUND@{INTDIVIDEBY3ROUND}}
\index{INTDIVIDEBY3ROUND@{INTDIVIDEBY3ROUND}!bayer-lcv.c@{bayer-lcv.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define INTDIVIDEBY3ROUND(x)~((x + 1) / 3)}\label{bayer-lcv_8c_2d3bb940d8d54bbe15a01aca8f68c88c}




Definiert in Zeile 31 der Datei bayer-lcv.c.

Wird benutzt von cfa2bgr\_\-InterpGreenBorder().\index{bayer-lcv.c@{bayer-lcv.c}!INTDIVIDEBY4ROUND@{INTDIVIDEBY4ROUND}}
\index{INTDIVIDEBY4ROUND@{INTDIVIDEBY4ROUND}!bayer-lcv.c@{bayer-lcv.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define INTDIVIDEBY4ROUND(x)~((x + 2) / 4)}\label{bayer-lcv_8c_40df06c100ea57dc9c149f2a12a7f90e}




Definiert in Zeile 32 der Datei bayer-lcv.c.

Wird benutzt von cfa2bgr\_\-InterpCurGreen(), cfa2bgr\_\-InterpCurRedOrBlueDiag(), cfa2bgr\_\-InterpGreenBorder() und cfa2bgr\_\-InterpRedOrBlue().\index{bayer-lcv.c@{bayer-lcv.c}!INTDIVIDEBY8ROUND@{INTDIVIDEBY8ROUND}}
\index{INTDIVIDEBY8ROUND@{INTDIVIDEBY8ROUND}!bayer-lcv.c@{bayer-lcv.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define INTDIVIDEBY8ROUND(x)~((x + 4) / 8)}\label{bayer-lcv_8c_1e58feb56979e2c69ab8bd0fcec33403}




Definiert in Zeile 33 der Datei bayer-lcv.c.

Wird benutzt von cfa2bgr\_\-InterpCurGreen().\index{bayer-lcv.c@{bayer-lcv.c}!ISODD@{ISODD}}
\index{ISODD@{ISODD}!bayer-lcv.c@{bayer-lcv.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define ISODD(x)~(x \& 0x1)}\label{bayer-lcv_8c_46f334971b3b75297177daaf93625502}




Definiert in Zeile 35 der Datei bayer-lcv.c.

Wird benutzt von cfa2bgr\_\-InterpGreenBorder() und cfa2bgr\_\-InterpRedOrBlueBorder().\index{bayer-lcv.c@{bayer-lcv.c}!SATURATE2CHAR@{SATURATE2CHAR}}
\index{SATURATE2CHAR@{SATURATE2CHAR}!bayer-lcv.c@{bayer-lcv.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define SATURATE2CHAR(x)~(x $<$ 0 ? 0 : (x $>$ 255 ? 255 : x))}\label{bayer-lcv_8c_4cc86401fbdb901680dee4a847fa3d94}




Definiert in Zeile 34 der Datei bayer-lcv.c.

Wird benutzt von cfa2bgr\_\-InterpCurGreen(), cfa2bgr\_\-InterpCurRedOrBlueDiag() und cfa2bgr\_\-InterpRedOrBlue().

\subsection{Dokumentation der Funktionen}
\index{bayer-lcv.c@{bayer-lcv.c}!cfa2bgr_AllocMem@{cfa2bgr\_\-AllocMem}}
\index{cfa2bgr_AllocMem@{cfa2bgr\_\-AllocMem}!bayer-lcv.c@{bayer-lcv.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned char$\ast$ cfa2bgr\_\-AllocMem (int {\em size})}\label{bayer-lcv_8c_433d67b039529aee5d9dfe9a36b849a6}




Definiert in Zeile 42 der Datei bayer-lcv.c.

Wird benutzt von cfa2bgr\_\-DoBayerFiltering().\index{bayer-lcv.c@{bayer-lcv.c}!cfa2bgr_CopyConstPix2Out@{cfa2bgr\_\-CopyConstPix2Out}}
\index{cfa2bgr_CopyConstPix2Out@{cfa2bgr\_\-CopyConstPix2Out}!bayer-lcv.c@{bayer-lcv.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void cfa2bgr\_\-CopyConstPix2Out (unsigned char $\ast$ {\em pInpData}, unsigned char $\ast$ {\em pOutData}, int {\em nXSize}, int {\em nYSize}, int {\em nStartPixX}, int {\em nStartPixY}, {\bf Color} {\em Col})}\label{bayer-lcv_8c_ea2573951d37d25d3e98d3aaf668ed18}




Definiert in Zeile 121 der Datei bayer-lcv.c.

Wird benutzt von cfa2bgr\_\-DoBayerFiltering().\index{bayer-lcv.c@{bayer-lcv.c}!cfa2bgr_DetFirstPos@{cfa2bgr\_\-DetFirstPos}}
\index{cfa2bgr_DetFirstPos@{cfa2bgr\_\-DetFirstPos}!bayer-lcv.c@{bayer-lcv.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void cfa2bgr\_\-DetFirstPos (int $\ast$ {\em nRx}, int $\ast$ {\em nRy}, int $\ast$ {\em nGx}, int $\ast$ {\em nGy}, int $\ast$ {\em nBx}, int $\ast$ {\em nBy})}\label{bayer-lcv_8c_1548ff298fb29b921f7124f62fd13e39}




Definiert in Zeile 90 der Datei bayer-lcv.c.

Wird benutzt von cfa2bgr\_\-DoBayerFiltering().\index{bayer-lcv.c@{bayer-lcv.c}!cfa2bgr_DoBayerFiltering@{cfa2bgr\_\-DoBayerFiltering}}
\index{cfa2bgr_DoBayerFiltering@{cfa2bgr\_\-DoBayerFiltering}!bayer-lcv.c@{bayer-lcv.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned char$\ast$ cfa2bgr\_\-DoBayerFiltering (unsigned char $\ast$ {\em raw\_\-buf}, int {\em header\_\-size}, int {\em width}, int {\em height})}\label{bayer-lcv_8c_591ee3e7fb0b3311c0e346160ce49a5f}




Definiert in Zeile 51 der Datei bayer-lcv.c.

Wird benutzt von lcv\_\-capture\_\-frame().\index{bayer-lcv.c@{bayer-lcv.c}!cfa2bgr_InterpCurGreen@{cfa2bgr\_\-InterpCurGreen}}
\index{cfa2bgr_InterpCurGreen@{cfa2bgr\_\-InterpCurGreen}!bayer-lcv.c@{bayer-lcv.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned char cfa2bgr\_\-InterpCurGreen (unsigned char $\ast$ {\em pInpData}, int {\em nCurIndx}, int {\em nXSize})}\label{bayer-lcv_8c_f32b188b68942e6dc498c28fde558b78}




Definiert in Zeile 165 der Datei bayer-lcv.c.

Wird benutzt von cfa2bgr\_\-InterpGreen().\index{bayer-lcv.c@{bayer-lcv.c}!cfa2bgr_InterpCurRedOrBlueDiag@{cfa2bgr\_\-InterpCurRedOrBlueDiag}}
\index{cfa2bgr_InterpCurRedOrBlueDiag@{cfa2bgr\_\-InterpCurRedOrBlueDiag}!bayer-lcv.c@{bayer-lcv.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned char cfa2bgr\_\-InterpCurRedOrBlueDiag (unsigned char $\ast$ {\em pInpData}, unsigned char $\ast$ {\em pOutData}, int {\em nCurIndx}, int {\em nXSize})}\label{bayer-lcv_8c_d47d48e05330c7fc5e7a0d4b28e4d2b8}




Definiert in Zeile 362 der Datei bayer-lcv.c.

Wird benutzt von cfa2bgr\_\-InterpRedOrBlue().\index{bayer-lcv.c@{bayer-lcv.c}!cfa2bgr_InterpGreen@{cfa2bgr\_\-InterpGreen}}
\index{cfa2bgr_InterpGreen@{cfa2bgr\_\-InterpGreen}!bayer-lcv.c@{bayer-lcv.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void cfa2bgr\_\-InterpGreen (unsigned char $\ast$ {\em pInpData}, unsigned char $\ast$ {\em pOutData}, int {\em nXSize}, int {\em nYSize}, int {\em nStartPixX}, int {\em nStartPixY})}\label{bayer-lcv_8c_d9ed7252b03ab300433b7c7798f203a7}




Definiert in Zeile 203 der Datei bayer-lcv.c.

Wird benutzt von cfa2bgr\_\-DoBayerFiltering().\index{bayer-lcv.c@{bayer-lcv.c}!cfa2bgr_InterpGreenBorder@{cfa2bgr\_\-InterpGreenBorder}}
\index{cfa2bgr_InterpGreenBorder@{cfa2bgr\_\-InterpGreenBorder}!bayer-lcv.c@{bayer-lcv.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void cfa2bgr\_\-InterpGreenBorder (unsigned char $\ast$ {\em pInpData}, unsigned char $\ast$ {\em pOutData}, int {\em nXSize}, int {\em nYSize}, int {\em nStartPixX}, int {\em nStartPixY})}\label{bayer-lcv_8c_687bac14e38d8b6549839b5d435b99c1}




Definiert in Zeile 234 der Datei bayer-lcv.c.

Wird benutzt von cfa2bgr\_\-InterpGreen().\index{bayer-lcv.c@{bayer-lcv.c}!cfa2bgr_InterpRedOrBlue@{cfa2bgr\_\-InterpRedOrBlue}}
\index{cfa2bgr_InterpRedOrBlue@{cfa2bgr\_\-InterpRedOrBlue}!bayer-lcv.c@{bayer-lcv.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void cfa2bgr\_\-InterpRedOrBlue (unsigned char $\ast$ {\em pInpData}, unsigned char $\ast$ {\em pOutData}, int {\em nXSize}, int {\em nYSize}, int {\em nStartPixX}, int {\em nStartPixY}, int {\em isRed})}\label{bayer-lcv_8c_bed4c40592605145d0a23d628580c301}




Definiert in Zeile 402 der Datei bayer-lcv.c.

Wird benutzt von cfa2bgr\_\-DoBayerFiltering().\index{bayer-lcv.c@{bayer-lcv.c}!cfa2bgr_InterpRedOrBlueBorder@{cfa2bgr\_\-InterpRedOrBlueBorder}}
\index{cfa2bgr_InterpRedOrBlueBorder@{cfa2bgr\_\-InterpRedOrBlueBorder}!bayer-lcv.c@{bayer-lcv.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void cfa2bgr\_\-InterpRedOrBlueBorder (unsigned char $\ast$ {\em pInpData}, unsigned char $\ast$ {\em pOutData}, int {\em nXSize}, int {\em nYSize}, int {\em nStartPixX}, int {\em nStartPixY}, int {\em isRed})}\label{bayer-lcv_8c_daf63759293e4aa8e8225e041b50e8e4}




Definiert in Zeile 478 der Datei bayer-lcv.c.

Wird benutzt von cfa2bgr\_\-InterpRedOrBlue().

\subsection{Variablen-Dokumentation}
\index{bayer-lcv.c@{bayer-lcv.c}!m_FirstPixColor@{m\_\-FirstPixColor}}
\index{m_FirstPixColor@{m\_\-FirstPixColor}!bayer-lcv.c@{bayer-lcv.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Color} {\bf m\_\-FirstPixColor} = B}\label{bayer-lcv_8c_1255d0173cbe449c0c28896d869d719b}




Definiert in Zeile 39 der Datei bayer-lcv.c.

Wird benutzt von cfa2bgr\_\-DetFirstPos().\index{bayer-lcv.c@{bayer-lcv.c}!m_SecondPixColor@{m\_\-SecondPixColor}}
\index{m_SecondPixColor@{m\_\-SecondPixColor}!bayer-lcv.c@{bayer-lcv.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Color} {\bf m\_\-SecondPixColor} = G}\label{bayer-lcv_8c_e1a5361ee6973b743e0ecb7c2c522ceb}




Definiert in Zeile 40 der Datei bayer-lcv.c.

Wird benutzt von cfa2bgr\_\-DetFirstPos().